package com.zlc.common.core.process.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zlc.common.common.service.BaseServiceImpl;
import com.zlc.common.core.process.model.entity.StoneProcessInstance;
import com.zlc.common.core.process.model.entity.StoneProcessInstanceHistory;
import com.zlc.common.core.process.mapper.StoneProcessInstanceHistoryMapper;
import com.zlc.common.core.process.model.vo.StoneProcessInstanceHistoryVo;
import com.zlc.common.core.process.service.StoneProcessInstanceHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author  zl
 * @date 2023-10-17 
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class StoneProcessInstanceHistoryServiceImpl extends BaseServiceImpl<StoneProcessInstanceHistoryMapper, StoneProcessInstanceHistory, StoneProcessInstanceHistoryVo> implements StoneProcessInstanceHistoryService{

    @Autowired
    private StoneProcessInstanceHistoryMapper stoneProcessInstanceHistoryMapper;

    @Override
    public StoneProcessInstanceHistoryVo getByProcessInstanceId(String processInstanceId) {
        LambdaQueryWrapper<StoneProcessInstanceHistory> wrapper = wrapper().eq(StoneProcessInstanceHistory::getProcessInstanceId, processInstanceId);
        return queryOne(wrapper);
    }
}
